var waitingStyle = {
	style: "black",
	color: "#FF0000",
	title: '正在加载...', //等待对话框上显示的提示内容
	background: "rgba(0,0,0,0)",
	loading: {
		icon: "../images/alert-icon-pay.png",
		display: "inline"
	}
};
/**
 * @description 新开窗口
 * @param {URIString} target  需要打开的页面的地址
 * @param {Object} parm 传递的对象
 * @param {Boolean} autoShow 是否自动显示
 * @example openNew({URIString});
 **/
function openNew(target, parm, autoShow) {
	var currPageId = plus.webview.currentWebview().id;
	var id = "main.html"; //除了一级目录，其它目录id组成结构为：二级文件夹/页面.html
	if(currPageId != undefined) {
		id = target;
	}
	var isAutoShow = autoShow || true;
	//	console.log("currPageId=" + currPageId + " target=" + target + " id=" + id + " parm=" + JSON.stringify(parm) + " isAutoShow=" + isAutoShow);
	mui.openWindow({
		url: target,
		id: id,
		show: {
			autoShow: isAutoShow, //页面loaded事件发生后自动显示，默认为true
			aniShow: 'pop-in',
			duration: 200
		},
		waiting: {
			autoShow: true,
			options: waitingStyle
		},
		extras: {
			info: parm
		}
	})
}

mui.plusReady(function() {
	$('.link-href').click(function() {
//			alert('1')
		var datahref = this.dataset.href;
		console.log(datahref)
		openNew(datahref);
	})
	mui('body').on('tap','a',function(){document.location.href=this.href;});
})